
ac.skill('Boss3-1'){
    cool = 8,
    title = '死亡镰刀',
    range = 800,
    casttime = 0,
    model1 = [[BOSS3_hld.mdl]],
    on_cast_shot = function(self)
        local hero = self.owner
        hero:add_buff '技能蓄力'{time = 3,skill = self}
        local group = ac.selector('unit'):range(hero,self.range):enemy(hero):is_type('英雄'):get()
        for _,unit in ipairs(group) do
            ac.timer(500,5,function()
                local point = unit:get_point()
                local damage = hero:get('攻击') * 3
                local time = 1
                ac.hint_red(point,100,time + 0.5)
                ac.wait(time*1000,function()
                    hero:launch_missile(point,self.model1,1200,0.15,function()
                        hero:aoe_damage(point,100,damage,self)
                    end,{
                        size = 2,
                    })
                end)
            end)
        end
    end,
}


ac.skill('Boss3-2'){
    title = '灵能爆炸',
    targettype = '点',
    range = 1200,
    cool = 8,
    model1 = [[BOSS3_dyzsqy.mdl]],
    model2 = [[BOSS3_dyzs.mdl]],
    on_cast_shot = function(self)
        local hero = self.owner
        local point1 = hero:get_point()
        local point2 = self.target:get_point()
        local angle = point1 / point2
        local time = 2
        ac.hint_red(point2,500,time)
        hero:add_buff '技能蓄力'{time = time,skill = self}
        hero:set_facing(angle)
        ac.wait(time*1000,function()
            local damage = hero:get('攻击') * 10
            hero:create_shadow(hero,angle,0.3)
            hero:set_point(point2)
            hero:add_buff '技能蓄力'{time = 3,skill = self}
            hero:get_point():add_effect(self.model1,3)
            hero:aoe_damage(point2,500,damage)
            
            ac.timer(100,30,function()
                local damage = hero:get('攻击') * 5
                local point = hero:get_point():random(1500)
                ac.hint_red(point,200,1)
                ac.wait(1*1000,function()
                    point:add_effect(self.model2):remove()
                    hero:aoe_damage(point,200,damage)
                end)
            end)
        end)
    end,
}
